home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_xemacs.idb / usr / freeware / lib / xemacs-20.4 / lisp / utils / assoc.elc.z / assoc.elc
Emacs Compiled Lisp  |  1998-05-21  |  4.1 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text


This file was processed as: Emacs Compiled Lisp (other/emacsCompiledLisp).
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
1% dexvert Emacs Compiled Lisp (other/emacsCompiledLisp) magic Unsupported
100% file Emacs/XEmacs v20 byte-compiled Lisp data default
99% file data default
100% TrID Emacs/XEmacs byte-compiled Lisp (generic) default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3b 45 4c 43 14 00 00 00 | 0a 3b 3b 3b 20 63 6f 6d |;ELC....|.;;; com|
|00000010| 70 69 6c 65 64 20 62 79 | 20 6a 75 73 74 69 6e 62 |piled by| justinb|
|00000020| 40 65 62 6f 6e 79 2e 63 | 72 61 79 2e 63 6f 6d 20 |@ebony.c|ray.com |
|00000030| 6f 6e 20 4d 6f 6e 20 4d | 61 72 20 20 39 20 31 32 |on Mon M|ar 9 12|
|00000040| 3a 35 35 3a 33 35 20 31 | 39 39 38 0a 3b 3b 3b 20 |:55:35 1|998.;;; |
|00000050| 66 72 6f 6d 20 66 69 6c | 65 20 2f 68 6f 6d 65 2f |from fil|e /home/|
|00000060| 61 73 70 65 6e 30 37 2f | 6a 75 73 74 69 6e 62 2f |aspen07/|justinb/|
|00000070| 72 6f 6f 74 73 2f 66 72 | 65 65 77 61 72 65 2f 78 |roots/fr|eeware/x|
|00000080| 65 6d 61 63 73 2f 32 30 | 2e 33 2f 78 65 6d 61 63 |emacs/20|.3/xemac|
|00000090| 73 2d 32 30 2e 33 2f 6c | 69 73 70 2f 75 74 69 6c |s-20.3/l|isp/util|
|000000a0| 73 2f 61 73 73 6f 63 2e | 65 6c 0a 3b 3b 3b 20 65 |s/assoc.|el.;;; e|
|000000b0| 6d 61 63 73 20 76 65 72 | 73 69 6f 6e 20 32 30 2e |macs ver|sion 20.|
|000000c0| 34 20 22 45 6d 65 72 61 | 6c 64 22 20 58 45 6d 61 |4 "Emera|ld" XEma|
|000000d0| 63 73 20 20 4c 75 63 69 | 64 2e 0a 3b 3b 3b 20 62 |cs Luci|d..;;; b|
|000000e0| 79 74 65 63 6f 6d 70 20 | 76 65 72 73 69 6f 6e 20 |ytecomp |version |
|000000f0| 32 2e 32 35 20 58 45 6d | 61 63 73 3b 20 32 32 2d |2.25 XEm|acs; 22-|
|00000100| 4d 61 72 2d 39 36 2e 0a | 3b 3b 3b 20 6f 70 74 69 |Mar-96..|;;; opti|
|00000110| 6d 69 7a 61 74 69 6f 6e | 20 69 73 20 6f 6e 2e 0a |mization| is on..|
|00000120| 3b 3b 3b 20 74 68 69 73 | 20 66 69 6c 65 20 75 73 |;;; this| file us|
|00000130| 65 73 20 6f 70 63 6f 64 | 65 73 20 77 68 69 63 68 |es opcod|es which|
|00000140| 20 64 6f 20 6e 6f 74 20 | 65 78 69 73 74 20 69 6e | do not |exist in|
|00000150| 20 45 6d 61 63 73 20 31 | 39 2e 0a 0a 28 69 66 20 | Emacs 1|9...(if |
|00000160| 28 61 6e 64 20 28 62 6f | 75 6e 64 70 20 27 65 6d |(and (bo|undp 'em|
|00000170| 61 63 73 2d 76 65 72 73 | 69 6f 6e 29 0a 09 20 28 |acs-vers|ion).. (|
|00000180| 6f 72 20 28 61 6e 64 20 | 28 62 6f 75 6e 64 70 20 |or (and |(boundp |
|00000190| 27 65 70 6f 63 68 3a 3a | 76 65 72 73 69 6f 6e 29 |'epoch::|version)|
|000001a0| 20 65 70 6f 63 68 3a 3a | 76 65 72 73 69 6f 6e 29 | epoch::|version)|
|000001b0| 0a 09 20 20 20 20 20 28 | 73 74 72 69 6e 67 2d 6c |.. (|string-l|
|000001c0| 65 73 73 70 20 65 6d 61 | 63 73 2d 76 65 72 73 69 |essp ema|cs-versi|
|000001d0| 6f 6e 20 22 32 30 22 29 | 29 29 0a 20 20 20 20 28 |on "20")|)). (|
|000001e0| 65 72 72 6f 72 20 22 60 | 61 73 73 6f 63 2e 65 6c |error "`|assoc.el|
|000001f0| 27 20 77 61 73 20 63 6f | 6d 70 69 6c 65 64 20 66 |' was co|mpiled f|
|00000200| 6f 72 20 45 6d 61 63 73 | 20 32 30 22 29 29 0a 0a |or Emacs| 20"))..|
|00000210| 28 6f 72 20 28 62 6f 75 | 6e 64 70 20 27 63 75 72 |(or (bou|ndp 'cur|
|00000220| 72 65 6e 74 2d 6c 6f 61 | 64 2d 6c 69 73 74 29 20 |rent-loa|d-list) |
|00000230| 28 73 65 74 71 20 63 75 | 72 72 65 6e 74 2d 6c 6f |(setq cu|rrent-lo|
|00000240| 61 64 2d 6c 69 73 74 20 | 6e 69 6c 29 29 0a 0a 0a |ad-list |nil))...|
|00000250| 23 40 32 37 38 20 4d 6f | 76 65 20 61 20 73 70 65 |#@278 Mo|ve a spe|
|00000260| 63 69 66 69 65 64 20 6b | 65 79 2d 76 61 6c 75 65 |cified k|ey-value|
|00000270| 20 70 61 69 72 20 74 6f | 20 74 68 65 20 68 65 61 | pair to| the hea|
|00000280| 64 20 6f 66 20 61 6e 20 | 61 6c 69 73 74 2e 0a 54 |d of an |alist..T|
|00000290| 68 65 20 61 6c 69 73 74 | 20 69 73 20 72 65 66 65 |he alist| is refe|
|000002a0| 72 65 6e 63 65 64 20 62 | 79 20 41 4c 49 53 54 2d |renced b|y ALIST-|
|000002b0| 53 59 4d 42 4f 4c 2e 20 | 4b 65 79 2d 76 61 6c 75 |SYMBOL. |Key-valu|
|000002c0| 65 20 70 61 69 72 20 74 | 6f 20 6d 6f 76 65 20 74 |e pair t|o move t|
|000002d0| 6f 0a 68 65 61 64 20 69 | 73 20 6f 6e 65 20 6d 61 |o.head i|s one ma|
|000002e0| 74 63 68 69 6e 67 20 4b | 45 59 2e 20 20 52 65 74 |tching K|EY. Ret|
|000002f0| 75 72 6e 73 20 74 68 65 | 20 73 6f 72 74 65 64 20 |urns the| sorted |
|00000300| 6c 69 73 74 20 61 6e 64 | 20 64 6f 65 73 6e 27 74 |list and| doesn't|
|00000310| 20 61 66 66 65 63 74 0a | 74 68 65 20 6f 72 64 65 | affect.|the orde|
|00000320| 72 20 6f 66 20 61 6e 79 | 20 6f 74 68 65 72 20 6b |r of any| other k|
|00000330| 65 79 2d 76 61 6c 75 65 | 20 70 61 69 72 2e 20 20 |ey-value| pair. |
|00000340| 53 69 64 65 20 65 66 66 | 65 63 74 20 73 65 74 73 |Side eff|ect sets|
|00000350| 20 61 6c 69 73 74 20 74 | 6f 20 6e 65 77 0a 73 6f | alist t|o new.so|
|00000360| 72 74 65 64 20 6c 69 73 | 74 2e 1f 0a 28 64 65 66 |rted lis|t...(def|
|00000370| 61 6c 69 61 73 20 27 61 | 73 6f 72 74 20 23 5b 28 |alias 'a|sort #[(|
|00000380| 61 6c 69 73 74 2d 73 79 | 6d 62 6f 6c 20 6b 65 79 |alist-sy|mbol key|
|00000390| 29 20 22 08 c1 c2 c3 08 | 21 21 c4 5c 22 4c 87 22 |) ".....|!!.\"L."|
|000003a0| 20 5b 61 6c 69 73 74 2d | 73 79 6d 62 6f 6c 20 73 | [alist-|symbol s|
|000003b0| 6f 72 74 20 63 6f 70 79 | 2d 61 6c 69 73 74 20 65 |ort copy|-alist e|
|000003c0| 76 61 6c 20 23 5b 28 61 | 20 62 29 20 22 08 40 09 |val #[(a| b) ".@.|
|000003d0| 6b 87 22 20 5b 61 20 6b | 65 79 5d 20 32 5d 5d 20 |k." [a k|ey] 2]] |
|000003e0| 35 20 28 23 24 20 2e 20 | 35 39 38 29 5d 29 0a 23 |5 (#$ . |598)]).#|
|000003f0| 40 31 32 36 20 4d 61 6b | 65 73 20 61 20 6c 69 73 |@126 Mak|es a lis|
|00000400| 74 20 6f 66 20 61 20 63 | 6f 6e 73 20 63 65 6c 6c |t of a c|ons cell|
|00000410| 20 63 6f 6e 74 61 69 6e | 69 6e 67 20 63 61 72 20 | contain|ing car |
|00000420| 6f 66 20 4b 45 59 20 61 | 6e 64 20 63 64 72 20 6f |of KEY a|nd cdr o|
|00000430| 66 20 56 41 4c 55 45 2e | 0a 54 68 65 20 72 65 74 |f VALUE.|.The ret|
|00000440| 75 72 6e 65 64 20 6c 69 | 73 74 20 69 73 20 73 75 |urned li|st is su|
|00000450| 69 74 61 62 6c 65 20 61 | 73 20 61 6e 20 65 6c 65 |itable a|s an ele|
|00000460| 6d 65 6e 74 20 6f 66 20 | 61 6e 20 61 6c 69 73 74 |ment of |an alist|
|00000470| 2e 1f 0a 28 64 65 66 61 | 6c 69 61 73 20 27 61 65 |...(defa|lias 'ae|
|00000480| 6c 65 6d 65 6e 74 20 23 | 5b 28 6b 65 79 20 76 61 |lement #|[(key va|
|00000490| 6c 75 65 29 20 22 08 09 | 42 43 87 22 20 5b 6b 65 |lue) "..|BC." [ke|
|000004a0| 79 20 76 61 6c 75 65 5d | 20 32 20 28 23 24 20 2e |y value]| 2 (#$ .|
|000004b0| 20 31 30 31 33 29 5d 29 | 0a 23 40 34 35 20 52 65 | 1013)])|.#@45 Re|
|000004c0| 74 75 72 6e 20 74 68 65 | 20 6b 65 79 20 73 79 6d |turn the| key sym|
|000004d0| 62 6f 6c 20 61 74 20 74 | 68 65 20 68 65 61 64 20 |bol at t|he head |
|000004e0| 6f 66 20 41 4c 49 53 54 | 2e 1f 0a 28 64 65 66 61 |of ALIST|...(defa|
|000004f0| 6c 69 61 73 20 27 61 68 | 65 61 64 73 79 6d 20 23 |lias 'ah|eadsym #|
|00000500| 5b 28 61 6c 69 73 74 29 | 20 22 08 40 40 87 22 20 |[(alist)| ".@@." |
|00000510| 5b 61 6c 69 73 74 5d 20 | 31 20 28 23 24 20 2e 20 |[alist] |1 (#$ . |
|00000520| 31 32 31 34 29 5d 29 0a | 23 40 33 33 35 20 46 69 |1214)]).|#@335 Fi|
|00000530| 6e 64 20 6f 75 74 20 69 | 66 20 61 20 73 70 65 63 |nd out i|f a spec|
|00000540| 69 66 69 65 64 20 6b 65 | 79 2d 76 61 6c 75 65 20 |ified ke|y-value |
|00000550| 70 61 69 72 20 69 73 20 | 6e 6f 74 20 61 74 20 74 |pair is |not at t|
|00000560| 68 65 20 68 65 61 64 20 | 6f 66 20 61 6e 20 61 6c |he head |of an al|
|00000570| 69 73 74 2e 0a 54 68 65 | 20 61 6c 69 73 74 20 74 |ist..The| alist t|
|00000580| 6f 20 63 68 65 63 6b 20 | 69 73 20 73 70 65 63 69 |o check |is speci|
|00000590| 66 69 65 64 20 62 79 20 | 41 4c 49 53 54 20 61 6e |fied by |ALIST an|
|000005a0| 64 20 74 68 65 20 6b 65 | 79 2d 76 61 6c 75 65 20 |d the ke|y-value |
|000005b0| 70 61 69 72 20 69 73 20 | 74 68 65 0a 6f 6e 65 20 |pair is |the.one |
|000005c0| 6d 61 74 63 68 69 6e 67 | 20 74 68 65 20 73 75 70 |matching| the sup|
|000005d0| 70 6c 69 65 64 20 4b 45 | 59 2e 20 20 52 65 74 75 |plied KE|Y. Retu|
|000005e0| 72 6e 73 20 6e 69 6c 20 | 69 66 20 41 4c 49 53 54 |rns nil |if ALIST|
|000005f0| 20 69 73 20 6e 69 6c 2c | 20 6f 72 20 69 66 0a 6b | is nil,| or if.k|
|00000600| 65 79 2d 76 61 6c 75 65 | 20 70 61 69 72 20 69 73 |ey-value| pair is|
|00000610| 20 61 74 20 74 68 65 20 | 68 65 61 64 20 6f 66 20 | at the |head of |
|00000620| 74 68 65 20 61 6c 69 73 | 74 2e 20 20 52 65 74 75 |the alis|t. Retu|
|00000630| 72 6e 73 20 74 20 69 66 | 20 6b 65 79 2d 76 61 6c |rns t if| key-val|
|00000640| 75 65 0a 70 61 69 72 20 | 69 73 20 6e 6f 74 20 61 |ue.pair |is not a|
|00000650| 74 20 74 68 65 20 68 65 | 61 64 20 6f 66 20 61 6c |t the he|ad of al|
|00000660| 69 73 74 2e 20 20 41 4c | 49 53 54 20 69 73 20 6e |ist. AL|IST is n|
|00000670| 6f 74 20 61 6c 74 65 72 | 65 64 2e 1f 0a 28 64 65 |ot alter|ed...(de|
|00000680| 66 61 6c 69 61 73 20 27 | 61 6e 6f 74 2d 68 65 61 |falias '|anot-hea|
|00000690| 64 2d 70 20 23 5b 28 61 | 6c 69 73 74 20 6b 65 79 |d-p #[(a|list key|
|000006a0| 29 20 22 c0 09 21 5c 6e | 6b 3f 87 22 20 5b 61 68 |) "..!\n|k?." [ah|
|000006b0| 65 61 64 73 79 6d 20 61 | 6c 69 73 74 20 6b 65 79 |eadsym a|list key|
|000006c0| 5d 20 32 20 28 23 24 20 | 2e 20 31 33 32 36 29 5d |] 2 (#$ |. 1326)]|
|000006d0| 29 0a 23 40 36 30 35 20 | 49 6e 73 65 72 74 73 20 |).#@605 |Inserts |
|000006e0| 61 20 6b 65 79 2d 76 61 | 6c 75 65 20 70 61 69 72 |a key-va|lue pair|
|000006f0| 20 69 6e 74 6f 20 61 6e | 20 61 6c 69 73 74 2e 0a | into an| alist..|
|00000700| 54 68 65 20 61 6c 69 73 | 74 20 69 73 20 72 65 66 |The alis|t is ref|
|00000710| 65 72 65 6e 63 65 64 20 | 62 79 20 41 4c 49 53 54 |erenced |by ALIST|
|00000720| 2d 53 59 4d 42 4f 4c 2e | 20 54 68 65 20 6b 65 79 |-SYMBOL.| The key|
|00000730| 2d 76 61 6c 75 65 20 70 | 61 69 72 20 69 73 20 6d |-value p|air is m|
|00000740| 61 64 65 0a 66 72 6f 6d | 20 4b 45 59 20 61 6e 64 |ade.from| KEY and|
|00000750| 20 6f 70 74 69 6f 6e 61 | 6c 6c 79 2c 20 56 41 4c | optiona|lly, VAL|
|00000760| 55 45 2e 20 52 65 74 75 | 72 6e 73 20 74 68 65 20 |UE. Retu|rns the |
|00000770| 61 6c 74 65 72 65 64 20 | 61 6c 69 73 74 20 6f 72 |altered |alist or|
|00000780| 20 6e 69 6c 20 69 66 0a | 41 4c 49 53 54 20 69 73 | nil if.|ALIST is|
|00000790| 20 6e 69 6c 2e 0a 0a 49 | 66 20 74 68 65 20 6b 65 | nil...I|f the ke|
|000007a0| 79 2d 76 61 6c 75 65 20 | 70 61 69 72 20 72 65 66 |y-value |pair ref|
|000007b0| 65 72 65 6e 63 65 64 20 | 62 79 20 4b 45 59 20 63 |erenced |by KEY c|
|000007c0| 61 6e 20 62 65 20 66 6f | 75 6e 64 20 69 6e 20 74 |an be fo|und in t|
|000007d0| 68 65 20 61 6c 69 73 74 | 2c 20 61 6e 64 0a 56 41 |he alist|, and.VA|
|000007e0| 4c 55 45 20 69 73 20 73 | 75 70 70 6c 69 65 64 20 |LUE is s|upplied |
|000007f0| 6e 6f 6e 2d 6e 69 6c 2c | 20 74 68 65 6e 20 74 68 |non-nil,| then th|
|00000800| 65 20 76 61 6c 75 65 20 | 6f 66 20 4b 45 59 20 77 |e value |of KEY w|
|00000810| 69 6c 6c 20 62 65 20 73 | 65 74 20 74 6f 20 56 41 |ill be s|et to VA|
|00000820| 4c 55 45 2e 0a 49 66 20 | 56 41 4c 55 45 20 69 73 |LUE..If |VALUE is|
|00000830| 20 6e 6f 74 20 73 75 70 | 70 6c 69 65 64 2c 20 6f | not sup|plied, o|
|00000840| 72 20 69 73 20 6e 69 6c | 2c 20 74 68 65 20 6b 65 |r is nil|, the ke|
|00000850| 79 2d 76 61 6c 75 65 20 | 70 61 69 72 20 77 69 6c |y-value |pair wil|
|00000860| 6c 20 6e 6f 74 20 62 65 | 0a 6d 6f 64 69 66 69 65 |l not be|.modifie|
|00000870| 64 2c 20 62 75 74 20 77 | 69 6c 6c 20 62 65 20 6d |d, but w|ill be m|
|00000880| 6f 76 65 64 20 74 6f 20 | 74 68 65 20 68 65 61 64 |oved to |the head|
|00000890| 20 6f 66 20 74 68 65 20 | 61 6c 69 73 74 2e 20 49 | of the |alist. I|
|000008a0| 66 20 74 68 65 20 6b 65 | 79 2d 76 61 6c 75 65 0a |f the ke|y-value.|
|000008b0| 70 61 69 72 20 63 61 6e | 6e 6f 74 20 62 65 20 66 |pair can|not be f|
|000008c0| 6f 75 6e 64 20 69 6e 20 | 74 68 65 20 61 6c 69 73 |ound in |the alis|
|000008d0| 74 2c 20 69 74 20 77 69 | 6c 6c 20 62 65 20 69 6e |t, it wi|ll be in|
|000008e0| 73 65 72 74 65 64 20 69 | 6e 74 6f 20 74 68 65 20 |serted i|nto the |
|000008f0| 68 65 61 64 0a 6f 66 20 | 74 68 65 20 61 6c 69 73 |head.of |the alis|
|00000900| 74 20 28 77 69 74 68 20 | 76 61 6c 75 65 20 6e 69 |t (with |value ni|
|00000910| 6c 20 69 66 20 56 41 4c | 55 45 20 69 73 20 6e 69 |l if VAL|UE is ni|
|00000920| 6c 20 6f 72 20 6e 6f 74 | 20 73 75 70 70 6c 69 65 |l or not| supplie|
|00000930| 64 29 2e 1f 0a 28 64 65 | 66 61 6c 69 61 73 20 27 |d)...(de|falias '|
|00000940| 61 70 75 74 20 23 5b 28 | 61 6c 69 73 74 2d 73 79 |aput #[(|alist-sy|
|00000950| 6d 62 6f 6c 20 6b 65 79 | 20 26 6f 70 74 69 6f 6e |mbol key| &option|
|00000960| 61 6c 20 76 61 6c 75 65 | 29 20 22 c0 09 5c 6e 5c |al value|) "..\n\|
|00000970| 22 c3 1c 1d c6 0e 07 09 | 5c 22 88 c8 0e 07 21 89 |".......|\"....!.|
|00000980| 14 ac 86 0e 07 0d 4c aa | 98 c9 0c 09 5c 22 ab 88 |......L.|....\"..|
|00000990| 0e 07 0d 0c a4 4c aa 8a | 5c 6e ab 86 0c 0d 40 a0 |.....L..|\n....@.|
|000009a0| aa 81 0c 2a 87 22 20 5b | 61 65 6c 65 6d 65 6e 74 |...*." [|aelement|
|000009b0| 20 6b 65 79 20 76 61 6c | 75 65 20 6e 69 6c 20 61 | key val|ue nil a|
|000009c0| 6c 69 73 74 20 65 6c 65 | 6d 20 61 73 6f 72 74 20 |list ele|m asort |
|000009d0| 61 6c 69 73 74 2d 73 79 | 6d 62 6f 6c 20 65 76 61 |alist-sy|mbol eva|
|000009e0| 6c 20 61 6e 6f 74 2d 68 | 65 61 64 2d 70 5d 20 34 |l anot-h|ead-p] 4|
|000009f0| 20 28 23 24 20 2e 20 31 | 37 35 32 29 5d 29 0a 23 | (#$ . 1|752)]).#|
|00000a00| 40 31 36 30 20 44 65 6c | 65 74 65 20 61 20 6b 65 |@160 Del|ete a ke|
|00000a10| 79 2d 76 61 6c 75 65 20 | 70 61 69 72 20 66 72 6f |y-value |pair fro|
|00000a20| 6d 20 74 68 65 20 61 6c | 69 73 74 2e 0a 41 6c 69 |m the al|ist..Ali|
|00000a30| 73 74 20 69 73 20 72 65 | 66 65 72 65 6e 63 65 64 |st is re|ferenced|
|00000a40| 20 62 79 20 41 4c 49 53 | 54 2d 53 59 4d 42 4f 4c | by ALIS|T-SYMBOL|
|00000a50| 20 61 6e 64 20 74 68 65 | 20 6b 65 79 2d 76 61 6c | and the| key-val|
|00000a60| 75 65 20 70 61 69 72 20 | 74 6f 20 72 65 6d 6f 76 |ue pair |to remov|
|00000a70| 65 0a 69 73 20 70 61 69 | 72 20 6d 61 74 63 68 69 |e.is pai|r matchi|
|00000a80| 6e 67 20 4b 45 59 2e 20 | 20 52 65 74 75 72 6e 73 |ng KEY. | Returns|
|00000a90| 20 74 68 65 20 61 6c 74 | 65 72 65 64 20 61 6c 69 | the alt|ered ali|
|00000aa0| 73 74 2e 1f 0a 28 64 65 | 66 61 6c 69 61 73 20 27 |st...(de|falias '|
|00000ab0| 61 64 65 6c 65 74 65 20 | 23 5b 28 61 6c 69 73 74 |adelete |#[(alist|
|00000ac0| 2d 73 79 6d 62 6f 6c 20 | 6b 65 79 29 20 22 c0 09 |-symbol |key) "..|
|00000ad0| 5c 6e 5c 22 88 c3 09 21 | 89 1c ac 83 c5 aa 8d c6 |\n\"...!|........|
|00000ae0| 0c 5c 6e 5c 22 ab 83 0c | aa 84 09 0c 41 4c 29 87 |.\n\"...|....AL).|
|00000af0| 22 20 5b 61 73 6f 72 74 | 20 61 6c 69 73 74 2d 73 |" [asort| alist-s|
|00000b00| 79 6d 62 6f 6c 20 6b 65 | 79 20 65 76 61 6c 20 61 |ymbol ke|y eval a|
|00000b10| 6c 69 73 74 20 6e 69 6c | 20 61 6e 6f 74 2d 68 65 |list nil| anot-he|
|00000b20| 61 64 2d 70 5d 20 34 20 | 28 23 24 20 2e 20 32 35 |ad-p] 4 |(#$ . 25|
|00000b30| 36 35 29 5d 29 0a 23 40 | 33 39 34 20 52 65 74 75 |65)]).#@|394 Retu|
|00000b40| 72 6e 73 20 74 68 65 20 | 76 61 6c 75 65 20 69 6e |rns the |value in|
|00000b50| 20 41 4c 49 53 54 20 74 | 68 61 74 20 69 73 20 61 | ALIST t|hat is a|
|00000b60| 73 73 6f 63 69 61 74 65 | 64 20 77 69 74 68 20 4b |ssociate|d with K|
|00000b70| 45 59 2e 0a 4f 70 74 69 | 6f 6e 61 6c 20 4b 45 59 |EY..Opti|onal KEY|
|00000b80| 4e 49 4c 2d 50 20 64 65 | 73 63 72 69 62 65 73 20 |NIL-P de|scribes |
|00000b90| 77 68 61 74 20 74 6f 20 | 64 6f 20 69 66 20 74 68 |what to |do if th|
|00000ba0| 65 20 76 61 6c 75 65 20 | 61 73 73 6f 63 69 61 74 |e value |associat|
|00000bb0| 65 64 20 77 69 74 68 0a | 4b 45 59 20 69 73 20 6e |ed with.|KEY is n|
|00000bc0| 69 6c 2e 20 20 49 66 20 | 4b 45 59 4e 49 4c 2d 50 |il. If |KEYNIL-P|
|00000bd0| 20 69 73 20 6e 6f 74 20 | 73 75 70 70 6c 69 65 64 | is not |supplied|
|00000be0| 20 6f 72 20 69 73 20 6e | 69 6c 2c 20 61 6e 64 20 | or is n|il, and |
|00000bf0| 74 68 65 20 76 61 6c 75 | 65 20 69 73 0a 6e 69 6c |the valu|e is.nil|
|00000c00| 2c 20 74 68 65 6e 20 4b | 45 59 20 69 73 20 72 65 |, then K|EY is re|
|00000c10| 74 75 72 6e 65 64 2e 20 | 20 49 66 20 4b 45 59 4e |turned. | If KEYN|
|00000c20| 49 4c 2d 50 20 69 73 20 | 6e 6f 6e 2d 6e 69 6c 2c |IL-P is |non-nil,|
|00000c30| 20 74 68 65 6e 20 6e 69 | 6c 20 77 6f 75 6c 64 20 | then ni|l would |
|00000c40| 62 65 0a 72 65 74 75 72 | 6e 65 64 2e 0a 0a 49 66 |be.retur|ned...If|
|00000c50| 20 6e 6f 20 6b 65 79 2d | 76 61 6c 75 65 20 70 61 | no key-|value pa|
|00000c60| 69 72 20 6d 61 74 63 68 | 69 6e 67 20 4b 45 59 20 |ir match|ing KEY |
|00000c70| 63 6f 75 6c 64 20 62 65 | 20 66 6f 75 6e 64 20 69 |could be| found i|
|00000c80| 6e 20 41 4c 49 53 54 2c | 20 6f 72 20 41 4c 49 53 |n ALIST,| or ALIS|
|00000c90| 54 20 69 73 0a 6e 69 6c | 20 74 68 65 6e 20 6e 69 |T is.nil| then ni|
|00000ca0| 6c 20 69 73 20 72 65 74 | 75 72 6e 65 64 2e 20 41 |l is ret|urned. A|
|00000cb0| 4c 49 53 54 20 69 73 20 | 6e 6f 74 20 61 6c 74 65 |LIST is |not alte|
|00000cc0| 72 65 64 2e 1f 0a 28 64 | 65 66 61 6c 69 61 73 20 |red...(d|efalias |
|00000cd0| 27 61 67 65 74 20 23 5b | 28 61 6c 69 73 74 20 6b |'aget #[|(alist k|
|00000ce0| 65 79 20 26 6f 70 74 69 | 6f 6e 61 6c 20 6b 65 79 |ey &opti|onal key|
|00000cf0| 6e 69 6c 2d 70 29 20 22 | c0 09 21 1a 09 ac 83 c3 |nil-p) "|..!.....|
|00000d00| aa a0 c4 c2 0d 5c 22 88 | c6 5c 6e 0d 5c 22 ab 83 |.....\".|.\n.\"..|
|00000d10| c3 aa 92 5c 6e 40 41 ae | 8d 0e 07 ab 83 c3 aa 86 |...\n@A.|........|
|00000d20| 5c 6e 40 40 ae 81 c3 29 | 87 22 20 5b 63 6f 70 79 |\n@@...)|." [copy|
|00000d30| 2d 61 6c 69 73 74 20 61 | 6c 69 73 74 20 63 6f 70 |-alist a|list cop|
|00000d40| 79 20 6e 69 6c 20 61 73 | 6f 72 74 20 6b 65 79 20 |y nil as|ort key |
|00000d50| 61 6e 6f 74 2d 68 65 61 | 64 2d 70 20 6b 65 79 6e |anot-hea|d-p keyn|
|00000d60| 69 6c 2d 70 5d 20 33 20 | 28 23 24 20 2e 20 32 38 |il-p] 3 |(#$ . 28|
|00000d70| 37 36 29 5d 29 0a 23 40 | 35 35 39 20 4d 61 6b 65 |76)]).#@|559 Make|
|00000d80| 20 61 6e 20 61 73 73 6f | 63 69 61 74 69 6f 6e 20 | an asso|ciation |
|00000d90| 6c 69 73 74 2e 0a 54 68 | 65 20 61 73 73 6f 63 69 |list..Th|e associ|
|00000da0| 61 74 69 6f 6e 20 6c 69 | 73 74 20 69 73 20 61 74 |ation li|st is at|
|00000db0| 74 61 63 68 65 64 20 74 | 6f 20 74 68 65 20 61 6c |tached t|o the al|
|00000dc0| 69 73 74 20 72 65 66 65 | 72 65 6e 63 65 64 20 62 |ist refe|renced b|
|00000dd0| 79 0a 41 4c 49 53 54 2d | 53 59 4d 42 4f 4c 2e 20 |y.ALIST-|SYMBOL. |
|00000de0| 45 61 63 68 20 65 6c 65 | 6d 65 6e 74 20 69 6e 20 |Each ele|ment in |
|00000df0| 74 68 65 20 4b 45 59 4c | 49 53 54 20 62 65 63 6f |the KEYL|IST beco|
|00000e00| 6d 65 73 20 61 20 6b 65 | 79 20 61 6e 64 20 69 73 |mes a ke|y and is|
|00000e10| 0a 61 73 73 6f 63 69 61 | 74 65 64 20 77 69 74 68 |.associa|ted with|
|00000e20| 20 74 68 65 20 76 61 6c | 75 65 20 69 6e 20 56 41 | the val|ue in VA|
|00000e30| 4c 55 45 4c 49 53 54 20 | 77 69 74 68 20 74 68 65 |LUELIST |with the|
|00000e40| 20 73 61 6d 65 20 69 6e | 64 65 78 2e 20 49 66 0a | same in|dex. If.|
|00000e50| 56 41 4c 55 45 4c 49 53 | 54 20 69 73 20 6e 6f 74 |VALUELIS|T is not|
|00000e60| 20 73 75 70 70 6c 69 65 | 64 20 6f 72 20 69 73 20 | supplie|d or is |
|00000e70| 6e 69 6c 2c 20 74 68 65 | 6e 20 65 61 63 68 20 6b |nil, the|n each k|
|00000e80| 65 79 20 69 6e 20 4b 45 | 59 4c 49 53 54 20 69 73 |ey in KE|YLIST is|
|00000e90| 0a 61 73 73 6f 63 69 61 | 74 65 64 20 77 69 74 68 |.associa|ted with|
|00000ea0| 20 6e 69 6c 2e 0a 0a 4b | 45 59 4c 49 53 54 20 61 | nil...K|EYLIST a|
|00000eb0| 6e 64 20 56 41 4c 55 45 | 4c 49 53 54 20 73 68 6f |nd VALUE|LIST sho|
|00000ec0| 75 6c 64 20 68 61 76 65 | 20 74 68 65 20 73 61 6d |uld have| the sam|
|00000ed0| 65 20 6e 75 6d 62 65 72 | 20 6f 66 20 65 6c 65 6d |e number| of elem|
|00000ee0| 65 6e 74 73 2c 20 62 75 | 74 0a 74 68 69 73 20 69 |ents, bu|t.this i|
|00000ef0| 73 6e 27 74 20 65 6e 66 | 6f 72 63 65 64 2e 20 20 |sn't enf|orced. |
|00000f00| 49 66 20 56 41 4c 55 45 | 4c 49 53 54 20 69 73 20 |If VALUE|LIST is |
|00000f10| 73 6d 61 6c 6c 65 72 20 | 74 68 61 6e 20 4b 45 59 |smaller |than KEY|
|00000f20| 4c 49 53 54 2c 20 72 65 | 6d 61 69 6e 69 6e 67 0a |LIST, re|maining.|
|00000f30| 6b 65 79 73 20 61 72 65 | 20 61 73 73 6f 63 69 61 |keys are| associa|
|00000f40| 74 65 64 20 77 69 74 68 | 20 6e 69 6c 2e 20 20 49 |ted with| nil. I|
|00000f50| 66 20 56 41 4c 55 45 4c | 49 53 54 20 69 73 20 6c |f VALUEL|IST is l|
|00000f60| 61 72 67 65 72 20 74 68 | 61 6e 20 4b 45 59 4c 49 |arger th|an KEYLI|
|00000f70| 53 54 2c 0a 65 78 74 72 | 61 20 76 61 6c 75 65 73 |ST,.extr|a values|
|00000f80| 20 61 72 65 20 69 67 6e | 6f 72 65 64 2e 20 20 52 | are ign|ored. R|
|00000f90| 65 74 75 72 6e 73 20 74 | 68 65 20 63 72 65 61 74 |eturns t|he creat|
|00000fa0| 65 64 20 61 6c 69 73 74 | 2e 1f 0a 28 64 65 66 61 |ed alist|...(defa|
|00000fb0| 6c 69 61 73 20 27 61 6d | 61 6b 65 20 23 5b 28 61 |lias 'am|ake #[(a|
|00000fc0| 6c 69 73 74 2d 73 79 6d | 62 6f 6c 20 6b 65 79 6c |list-sym|bol keyl|
|00000fd0| 69 73 74 20 26 6f 70 74 | 69 6f 6e 61 6c 20 76 61 |ist &opt|ional va|
|00000fe0| 6c 75 65 6c 69 73 74 29 | 20 22 08 40 08 41 09 40 |luelist)| ".@.A.@|
|00000ff0| 09 41 1a 1b 1c 1d 0c ac | 89 c6 0e 07 0d 0b 23 88 |.A......|......#.|
|00001000| aa 8e c8 0e 07 0c 5c 6e | 23 88 c6 0e 07 0d 0b 23 |......\n|#......#|
|00001010| 88 2c c9 0e 07 21 87 22 | 20 5b 6b 65 79 6c 69 73 |.,...!."| [keylis|
|00001020| 74 20 76 61 6c 75 65 6c | 69 73 74 20 76 61 6c 63 |t valuel|ist valc|
|00001030| 64 72 20 76 61 6c 63 61 | 72 20 6b 65 79 63 64 72 |dr valca|r keycdr|
|00001040| 20 6b 65 79 63 61 72 20 | 61 70 75 74 20 61 6c 69 | keycar |aput ali|
|00001050| 73 74 2d 73 79 6d 62 6f | 6c 20 61 6d 61 6b 65 20 |st-symbo|l amake |
|00001060| 65 76 61 6c 5d 20 34 20 | 28 23 24 20 2e 20 33 34 |eval] 4 |(#$ . 34|
|00001070| 35 32 29 5d 29 0a 28 70 | 72 6f 76 69 64 65 20 27 |52)]).(p|rovide '|
|00001080| 61 73 73 6f 63 29 0a | |assoc). | |
+--------+-------------------------+-------------------------+--------+--------+